//
// Copyright (c) 2024 BPer
//

#include <bperutil/buffer/BPerAudioEncoderBuffer.h>

BPerAudioEncoderBuffer::BPerAudioEncoderBuffer(int32_t paudioCacheNum)
{
	resetIndex();
	m_cache_num=paudioCacheNum;
	initFrames(m_cache_num,1024);

}

BPerAudioEncoderBuffer::~BPerAudioEncoderBuffer()
{

}


void BPerAudioEncoderBuffer::reset(){
	resetIndex();
}

void BPerAudioEncoderBuffer::putAudio(BPerFrame* audioFrame){
	putPlayAudio(audioFrame);
}

void BPerAudioEncoderBuffer::getAudio(BPerFrame* audioFrame){
	getPlayAudio(audioFrame);
}
uint8_t* BPerAudioEncoderBuffer::getAudioRef(BPerFrame* frame){
	return getFrameRef(frame);
}
void BPerAudioEncoderBuffer::putPlayAudio(BPerFrame* audioFrame){
	putFrame(audioFrame);
}

void BPerAudioEncoderBuffer::getPlayAudio(BPerFrame* audioFrame){
	getFrame(audioFrame);
}


